var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var BundleConfig = require("AA_BundleConfig");
var ResKeeper = require("AA_ResKeeper");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
_decorator.property;

var _def_AutoImagZiTi = function (e) {
  function _creator() {
    return null !== e && e.apply(this, arguments) || this;
  }
  __extends(_creator, e);
  _creator.prototype.setValue = function (e) {
    return __awaiter(this, undefined, undefined, function () {
      var t;
      var o;
      var n;
      var i;
      var a;
      var r;
      var c;
      var l;
      var d;
      return __generator(this, function (s) {
        switch (s.label) {
          case 0:
            t = e.length;
            o = this.node.children;
            n = o.length;
            i = Math.max(t, n);
            a = 0;
            s.label = 1;
          case 1:
            if (a < i) {
              r = e[a];
              c = o[a];
              if (r) {
                if (c) {
                  l = c.getComponent(cc.Sprite);
                  return [4, this._loadRes(BundleConfig.BundleNames.Common, "common/" + "res/moster/boss_" + r, cc.SpriteFrame)];
                } else {
                  return [3, 3];
                }
              } else {
                return [3, 4];
              }
            } else {
              return [3, 6];
            }
          case 2:
            d = s.sent();
            l.spriteFrame = d;
            c.active = true;
            c.width = "1" == r ? 10 : 15;
            s.label = 3;
          case 3:
            return [3, 5];
          case 4:
            c && (c.active = false);
            s.label = 5;
          case 5:
            a++;
            return [3, 1];
          case 6:
            return [2];
        }
      });
    });
  };
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_AutoImagZiTi;